<template>
  <div>
   <!-- 这是更改的 -->
    <ul class="goodsList">
      <li
        class=""
        v-for="(item,index) in goodsList"
        :key="index"
        style="width=30%"
      >
        <router-link :to="'/details/'+item.goodsId">
          <img class="" :src="item.coverImgUrl" />
          <div class="">
            <div class="">{{item.name}}</div>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
</template>
<script>
import img1 from "../../images/wufenku.jpg";

export default {
  data() {
    return {
      img1: img1,
      img2: "../images/img2.png",
      img3: "../images/img3.png"
    };
  },
  props: {
    goodsList: {
      default() {
        return [];
      }
    }
  }
};
</script>
<style scoped>
.goodsList{
	display: flex;
}
.goodsList li{
	width: 50%;
	box-sizing: border-box;
	padding: 5px;
	text-align: center;
}
.goodsList li img{
	width: 100%;
}
</style>